package com.centit.exchange.po;

import java.util.Date;
import java.sql.Timestamp;
import javax.persistence.Column;


import javax.persistence.Id;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;


import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;


/**
 * create by scaffold 2020-04-08 
 * @author codefan@sina.com
 
  T_EXCHANGE_RATE汇率表   
*/
@Entity
@Table(name = "T_EXCHANGE_RATE")
public class ExchangeRate implements java.io.Serializable {
	private static final long serialVersionUID =  1L;



	/**
	 * DATE 发布日期 
	 */
	@Id
	@Column(name = "FB_DATE")
	
	private String fbDate;

	/**
	 * FOREIGN_BUY_PRI FOREIGN_BUY_PRI【现汇买入价】 
	 */
	@Column(name = "FOREIGN_BUY_PRI")
	@Length(min = 0, max = 255, message = "字段长度不能小于{min}大于{max}")
	private String  foreignBuyPri;
	/**
	 * MONEY_BUY_PRI MONEY_BUY_PRI【现钞买入价】 
	 */
	@Column(name = "MONEY_BUY_PRI")
	@Length(min = 0, max = 255, message = "字段长度不能小于{min}大于{max}")
	private String  moneyBuyPri;
	/**
	 * FOREIGN_SELL_PRI FOREIGN_SELL_PRI【现汇卖出价】 
	 */
	@Column(name = "FOREIGN_SELL_PRI")
	@Length(min = 0, max = 255, message = "字段长度不能小于{min}大于{max}")
	private String  foreignSellPri;
	/**
	 * MONEY_SELL_PRI MONEY_SELL_PRI【现钞卖出价】 
	 */
	@Column(name = "MONEY_SELL_PRI")
	@Length(min = 0, max = 255, message = "字段长度不能小于{min}大于{max}")
	private String  moneySellPri;
	/**
	 * BANK_CONVERSION_PRI BANK_CONVERSION_PRI【银行折算价/中间价】 
	 */
	@Column(name = "BANK_CONVERSION_PRI")
	@Length(min = 0, max = 255, message = "字段长度不能小于{min}大于{max}")
	private String  bankConversionPri;

	// Constructors
	/** default constructor */
	public ExchangeRate() {
	}
	/** minimal constructor */
	public ExchangeRate(
		String fbDate		
		) {
	
	
		this.fbDate = fbDate;		
			
	}

/** full constructor */
	public ExchangeRate(
	 String fbDate		
	,String  foreignBuyPri,String  moneyBuyPri,String  foreignSellPri,String  moneySellPri,String  bankConversionPri) {
	
	
		this.fbDate = fbDate;		
	
		this.foreignBuyPri= foreignBuyPri;
		this.moneyBuyPri= moneyBuyPri;
		this.foreignSellPri= foreignSellPri;
		this.moneySellPri= moneySellPri;
		this.bankConversionPri= bankConversionPri;		
	}
	

  
	
	public String getFbDate() {
		return fbDate;
	}
	public void setFbDate(String fbDate) {
		this.fbDate = fbDate;
	}
	// Property accessors
  
	public String getForeignBuyPri() {
		return this.foreignBuyPri;
	}
	
	public void setForeignBuyPri(String foreignBuyPri) {
		this.foreignBuyPri = foreignBuyPri;
	}
  
	public String getMoneyBuyPri() {
		return this.moneyBuyPri;
	}
	
	public void setMoneyBuyPri(String moneyBuyPri) {
		this.moneyBuyPri = moneyBuyPri;
	}
  
	public String getForeignSellPri() {
		return this.foreignSellPri;
	}
	
	public void setForeignSellPri(String foreignSellPri) {
		this.foreignSellPri = foreignSellPri;
	}
  
	public String getMoneySellPri() {
		return this.moneySellPri;
	}
	
	public void setMoneySellPri(String moneySellPri) {
		this.moneySellPri = moneySellPri;
	}
  
	public String getBankConversionPri() {
		return this.bankConversionPri;
	}
	
	public void setBankConversionPri(String bankConversionPri) {
		this.bankConversionPri = bankConversionPri;
	}



	public ExchangeRate copy(ExchangeRate other){
  
		this.setFbDate(other.getFbDate());
  
		this.foreignBuyPri= other.getForeignBuyPri();  
		this.moneyBuyPri= other.getMoneyBuyPri();  
		this.foreignSellPri= other.getForeignSellPri();  
		this.moneySellPri= other.getMoneySellPri();  
		this.bankConversionPri= other.getBankConversionPri();

		return this;
	}
	
	public ExchangeRate copyNotNullProperty(ExchangeRate other){
  
	if( other.getFbDate() != null){
	this.setFbDate(other.getFbDate());}
  
		if( other.getForeignBuyPri() != null){
		this.foreignBuyPri= other.getForeignBuyPri();}  
		if( other.getMoneyBuyPri() != null){
		this.moneyBuyPri= other.getMoneyBuyPri();}  
		if( other.getForeignSellPri() != null){
		this.foreignSellPri= other.getForeignSellPri();}  
		if( other.getMoneySellPri() != null){
		this.moneySellPri= other.getMoneySellPri();}  
		if( other.getBankConversionPri() != null){
		this.bankConversionPri= other.getBankConversionPri();}		

		return this;
	}

	public ExchangeRate clearProperties(){
  
		this.foreignBuyPri= null;  
		this.moneyBuyPri= null;  
		this.foreignSellPri= null;  
		this.moneySellPri= null;  
		this.bankConversionPri= null;

		return this;
	}
}
